package com.baidu.location;

import android.content.Context;
import android.location.GpsSatellite;
import android.location.GpsStatus;
import android.location.GpsStatus.Listener;
import android.location.GpsStatus.NmeaListener;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

class b
{
  private static final int jdField_char = 3000;
  private static String d = null;
  private static final int jdField_else = 3;
  private static final double f = 1.E-005D;
  private static final String jdField_goto = "baidu_location_service";
  private static int i = 0;
  private static final int jdField_long = 5;
  private boolean a = false;
  private a b = null;
  private boolean jdField_byte = true;
  private long c = 0L;
  private boolean jdField_case = false;
  private String jdField_do = null;
  private boolean e = false;
  private Handler jdField_for = null;
  private Context g;
  private boolean h = false;
  private String jdField_if = null;
  private final int jdField_int = 400;
  private long j = 0L;
  private b k = null;
  private Location l;
  private final long m = 1000L;
  private List n = new ArrayList();
  private long jdField_new = 0L;
  private LocationManager o = null;
  private String p = null;
  private String jdField_try = null;
  private GpsStatus jdField_void;

  public b(Context paramContext, Handler paramHandler)
  {
    this.g = paramContext;
    this.jdField_for = paramHandler;
  }

  private void a(Location paramLocation)
  {
    j.a("baidu_location_service", "set new gpsLocation ...");
    this.l = paramLocation;
    if (this.l == null);
    Object[] arrayOfObject;
    for (this.jdField_try = null; ; this.jdField_try = String.format("&ll=%.5f|%.5f&s=%.1f&d=%.1f&ll_n=%d&ll_t=%d", arrayOfObject))
    {
      this.jdField_for.obtainMessage(51).sendToTarget();
      return;
      long l1 = System.currentTimeMillis();
      this.l.setTime(l1);
      float f1 = (float)(3.6D * this.l.getSpeed());
      arrayOfObject = new Object[6];
      arrayOfObject[0] = Double.valueOf(this.l.getLongitude());
      arrayOfObject[1] = Double.valueOf(this.l.getLatitude());
      arrayOfObject[2] = Float.valueOf(f1);
      arrayOfObject[3] = Float.valueOf(this.l.getBearing());
      arrayOfObject[4] = Integer.valueOf(i);
      arrayOfObject[5] = Long.valueOf(l1);
    }
  }

  private void a(boolean paramBoolean)
  {
    this.h = paramBoolean;
    if ((paramBoolean) && (!jdField_case()));
    do
    {
      do
        return;
      while (j.jdField_try == paramBoolean);
      j.jdField_try = paramBoolean;
    }
    while (!j.jdField_void);
    this.jdField_for.obtainMessage(53).sendToTarget();
  }

  public static boolean a(Location paramLocation1, Location paramLocation2)
  {
    boolean bool = true;
    if (paramLocation1 == paramLocation2)
      bool = false;
    do
    {
      float f2;
      do
      {
        float f1;
        do
        {
          do
            return bool;
          while ((paramLocation1 == null) || (paramLocation2 == null));
          f1 = paramLocation2.getSpeed();
          f2 = paramLocation2.distanceTo(paramLocation1);
          if (f1 <= 10.0D)
            break;
        }
        while (f2 > j.jdField_case);
        return false;
        if (f1 <= 2.0D)
          break;
      }
      while (f2 > j.jdField_if);
      return false;
    }
    while ((Math.abs(paramLocation1.getLatitude() - paramLocation2.getLatitude()) > 1.E-005D) || (Math.abs(paramLocation1.getLongitude() - paramLocation2.getLongitude()) > 1.E-005D));
    return false;
  }

  public static String jdField_byte()
  {
    return d;
  }

  public static String jdField_if(Location paramLocation)
  {
    if (paramLocation == null)
      return null;
    float f1 = (float)(3.6D * paramLocation.getSpeed());
    float f2;
    int i1;
    if (paramLocation.hasAccuracy())
    {
      f2 = paramLocation.getAccuracy();
      i1 = (int)f2;
      if (!paramLocation.hasAltitude())
        break label151;
    }
    label151: for (double d1 = paramLocation.getAltitude(); ; d1 = 555.0D)
    {
      Object[] arrayOfObject = new Object[8];
      arrayOfObject[0] = Double.valueOf(paramLocation.getLongitude());
      arrayOfObject[1] = Double.valueOf(paramLocation.getLatitude());
      arrayOfObject[2] = Float.valueOf(f1);
      arrayOfObject[3] = Float.valueOf(paramLocation.getBearing());
      arrayOfObject[4] = Integer.valueOf(i1);
      arrayOfObject[5] = Integer.valueOf(i);
      arrayOfObject[6] = Double.valueOf(d1);
      arrayOfObject[7] = Long.valueOf(paramLocation.getTime() / 1000L);
      return String.format("&ll=%.5f|%.5f&s=%.1f&d=%.1f&ll_r=%d&ll_n=%d&ll_h=%.2f&ll_t=%d&g_tp=0", arrayOfObject);
      f2 = -1.0F;
      break;
    }
  }

  public void a()
  {
    if (!this.jdField_case)
      return;
    if (this.o != null);
    try
    {
      if (this.k != null)
        this.o.removeUpdates(this.k);
      if (this.b != null)
        this.o.removeGpsStatusListener(this.b);
      label51: this.k = null;
      this.b = null;
      this.o = null;
      this.jdField_case = false;
      a(false);
      return;
    }
    catch (Exception localException)
    {
      break label51;
    }
  }

  public boolean jdField_case()
  {
    if (!jdField_try());
    long l1;
    do
    {
      do
      {
        return false;
        l1 = System.currentTimeMillis();
      }
      while ((this.a) && (l1 - this.jdField_new > 3000L));
      if (i >= 3)
        return true;
    }
    while (l1 - this.c >= 3000L);
    return true;
  }

  public Location jdField_do()
  {
    return this.l;
  }

  public String jdField_if()
  {
    if (this.l != null)
    {
      String str1 = "{\"result\":{\"time\":\"" + j.a() + "\",\"error\":\"61\"},\"content\":{\"point\":{\"x\":" + "\"%f\",\"y\":\"%f\"},\"radius\":\"%d\",\"d\":\"%f\"," + "\"s\":\"%f\",\"n\":\"%d\"}}";
      if (this.l.hasAccuracy());
      for (float f1 = this.l.getAccuracy(); ; f1 = 10.0F)
      {
        int i1 = (int)f1;
        float f2 = (float)(3.6D * this.l.getSpeed());
        double[] arrayOfDouble = Jni.jdField_if(this.l.getLongitude(), this.l.getLatitude(), "gps2gcj");
        if ((arrayOfDouble[0] <= 0.0D) && (arrayOfDouble[1] <= 0.0D))
        {
          arrayOfDouble[0] = this.l.getLongitude();
          arrayOfDouble[1] = this.l.getLatitude();
        }
        Object[] arrayOfObject = new Object[6];
        arrayOfObject[0] = Double.valueOf(arrayOfDouble[0]);
        arrayOfObject[1] = Double.valueOf(arrayOfDouble[1]);
        arrayOfObject[2] = Integer.valueOf(i1);
        arrayOfObject[3] = Float.valueOf(this.l.getBearing());
        arrayOfObject[4] = Float.valueOf(f2);
        arrayOfObject[5] = Integer.valueOf(i);
        String str2 = String.format(str1, arrayOfObject);
        j.a("baidu_location_service", "wgs84: " + this.l.getLongitude() + " " + this.l.getLatitude() + " gcj02: " + arrayOfDouble[0] + " " + arrayOfDouble[1]);
        return str2;
      }
    }
    j.a("baidu_location_service", "gps man getGpsJson but gpslocation is null");
    return null;
  }

  public void jdField_int()
  {
    if (this.jdField_case == true)
      return;
    try
    {
      this.o = ((LocationManager)this.g.getSystemService("location"));
      this.k = new b(null);
      this.b = new a(null);
      this.o.requestLocationUpdates("gps", 1000L, 5.0F, this.k);
      this.o.addGpsStatusListener(this.b);
      this.o.addNmeaListener(this.b);
      this.jdField_case = true;
      return;
    }
    catch (Exception localException)
    {
      j.a("baidu_location_service", localException.getMessage());
    }
  }

  public String jdField_new()
  {
    return this.jdField_try;
  }

  public boolean jdField_try()
  {
    return (this.l != null) && (this.l.getLatitude() != 0.0D) && (this.l.getLongitude() != 0.0D);
  }

  private class a
    implements GpsStatus.NmeaListener, GpsStatus.Listener
  {
    private a()
    {
    }

    public void onGpsStatusChanged(int paramInt)
    {
      if (b.jdMethod_byte(b.this) == null)
        return;
      switch (paramInt)
      {
      case 3:
      default:
        return;
      case 2:
        b.a(b.this, null);
        b.a(b.this, false);
        b.a(0);
        return;
      case 4:
      }
      j.a("baidu_location_service", "gps status change");
      int i;
      if (b.jdMethod_new(b.this) == null)
      {
        b.a(b.this, b.jdMethod_byte(b.this).getGpsStatus(null));
        Iterator localIterator = b.jdMethod_new(b.this).getSatellites().iterator();
        i = 0;
        label118: if (!localIterator.hasNext())
          break label176;
        if (!((GpsSatellite)localIterator.next()).usedInFix())
          break label267;
      }
      label267: for (int j = i + 1; ; j = i)
      {
        i = j;
        break label118;
        b.jdMethod_byte(b.this).getGpsStatus(b.jdMethod_new(b.this));
        break;
        label176: j.a("baidu_location_service", "gps nunmber in count:" + i);
        if ((b.jdMethod_for() >= 3) && (i < 3))
          b.jdMethod_do(b.this, System.currentTimeMillis());
        if (i < 3)
          b.a(b.this, false);
        if ((b.jdMethod_for() <= 3) && (i > 3))
          b.a(b.this, true);
        b.a(i);
        return;
      }
    }

    public void onNmeaReceived(long paramLong, String paramString)
    {
      if ((paramString == null) || (paramString.equals("")))
        return;
      long l = System.currentTimeMillis();
      if ((l - b.jdMethod_for(b.this) > 400L) && (b.jdMethod_case(b.this)) && (b.jdMethod_try(b.this).size() > 0));
      try
      {
        b.c localc = new b.c(b.this, b.jdMethod_try(b.this), b.jdMethod_if(b.this), b.jdMethod_do(b.this), b.jdMethod_int(b.this));
        if (localc.jdMethod_if())
        {
          j.long = localc.c();
          if (j.long > 0)
          {
            Object[] arrayOfObject = new Object[11];
            arrayOfObject[0] = Double.valueOf(localc.d());
            arrayOfObject[1] = Double.valueOf(localc.l());
            arrayOfObject[2] = Double.valueOf(localc.jdMethod_case());
            arrayOfObject[3] = Double.valueOf(localc.j());
            arrayOfObject[4] = Integer.valueOf(0);
            arrayOfObject[5] = Integer.valueOf(localc.jdMethod_goto());
            arrayOfObject[6] = Double.valueOf(localc.jdMethod_try());
            arrayOfObject[7] = Double.valueOf(localc.a());
            arrayOfObject[8] = Double.valueOf(localc.b());
            arrayOfObject[9] = Long.valueOf(l / 1000L);
            arrayOfObject[10] = Integer.valueOf(j.long);
            b.a(String.format("&ll=%.5f|%.5f&s=%.1f&d=%.1f&ll_r=%d&ll_n=%d&ll_h=%.2f&nmea=%.1f|%.1f&ll_t=%d&g_tp=%d", arrayOfObject));
          }
        }
        while (true)
        {
          b.jdMethod_try(b.this).clear();
          b.jdMethod_do(b.this, b.jdMethod_if(b.this, b.a(b.this, null)));
          b.jdMethod_if(b.this, false);
          if (!paramString.startsWith("$GPGGA"))
            break;
          b.jdMethod_if(b.this, true);
          b.jdMethod_do(b.this, paramString.trim());
          b.jdMethod_if(b.this, System.currentTimeMillis());
          return;
          j.long = 0;
          j.a("baidu_location_service", "nmea invalid");
        }
      }
      catch (Exception localException)
      {
        while (true)
        {
          localException.printStackTrace();
          j.long = 0;
          continue;
          if (paramString.startsWith("$GPGSV"))
            b.jdMethod_try(b.this).add(paramString.trim());
          else if (paramString.startsWith("$GPRMC"))
            b.jdMethod_if(b.this, paramString.trim());
          else if (paramString.startsWith("$GPGSA"))
            b.a(b.this, paramString.trim());
        }
      }
    }
  }

  private class b
    implements LocationListener
  {
    private b()
    {
    }

    public void onLocationChanged(Location paramLocation)
    {
      b.a(b.this, paramLocation);
      b.jdMethod_do(b.this, false);
      if (b.a(b.this))
        b.a(b.this, true);
    }

    public void onProviderDisabled(String paramString)
    {
      b.a(b.this, null);
      b.a(b.this, false);
    }

    public void onProviderEnabled(String paramString)
    {
    }

    public void onStatusChanged(String paramString, int paramInt, Bundle paramBundle)
    {
      switch (paramInt)
      {
      default:
        return;
      case 0:
        b.a(b.this, null);
        b.a(b.this, false);
        return;
      case 1:
        b.a(b.this, System.currentTimeMillis());
        b.jdMethod_do(b.this, true);
        b.a(b.this, false);
        return;
      case 2:
      }
      b.jdMethod_do(b.this, false);
    }
  }

  public class c
  {
    public static final String g = "$GPRMC";
    public static final String jdField_if = "$GPGSA";
    public static final String l = "$GPGSV";
    public static final String x = "$GPGGA";
    private String A = "";
    private double B = 0.0D;
    private int C = 1;
    private int a = 10;
    private int b = 2;
    private double jdField_byte = 1.1D;
    private int c = 0;
    private double jdField_case = 2.3D;
    private char jdField_char = 'N';
    private double d = 500.0D;
    private int jdField_do = 7;
    private double e = 2.2D;
    private double jdField_else = 0.0D;
    private double f = 3.8D;
    private int jdField_for = 0;
    private int jdField_goto = 70;
    private boolean h = true;
    private boolean i = false;
    private int jdField_int = 20;
    private double j = 0.0D;
    private boolean k = false;
    private double jdField_long = 0.0D;
    private List m = null;
    private double n = 0.0D;
    private double jdField_new = 500.0D;
    private int o = 0;
    private String p = "";
    private boolean q = false;
    private String r = "";
    private boolean s = false;
    public int t = 0;
    private String jdField_try = "";
    private List u = null;
    private String v = "";
    private int jdField_void = 3;
    private int w = 120;
    private double z = 500.0D;

    public c(List paramString1, String paramString2, String paramString3, String arg5)
    {
      this.m = paramString1;
      this.jdField_try = paramString2;
      this.A = paramString3;
      Object localObject;
      this.r = localObject;
      this.u = new ArrayList();
      jdField_void();
    }

    private boolean a(String paramString)
    {
      boolean bool1 = false;
      if (paramString != null)
      {
        int i1 = paramString.length();
        bool1 = false;
        if (i1 >= 4)
        {
          int i2 = 1;
          int i3 = 0;
          while (i2 < -3 + paramString.length())
          {
            i3 ^= paramString.charAt(i2);
            i2++;
          }
          boolean bool2 = Integer.toHexString(i3).equalsIgnoreCase(paramString.substring(-2 + paramString.length(), paramString.length()));
          bool1 = false;
          if (bool2)
            bool1 = true;
        }
      }
      return bool1;
    }

    private double[] a(double paramDouble1, double paramDouble2)
    {
      double d1 = 0.0D;
      if (paramDouble2 == d1)
        if (paramDouble1 > d1)
          d1 = 90.0D;
      while (true)
      {
        double[] arrayOfDouble = new double[2];
        arrayOfDouble[0] = Math.sqrt(paramDouble1 * paramDouble1 + paramDouble2 * paramDouble2);
        arrayOfDouble[1] = d1;
        return arrayOfDouble;
        if (paramDouble1 < d1)
        {
          d1 = 270.0D;
          continue;
          d1 = Math.toDegrees(Math.atan(paramDouble1 / paramDouble2));
        }
      }
    }

    private double[] a(List paramList)
    {
      if ((paramList != null) && (paramList.size() > 0))
      {
        double[] arrayOfDouble1 = jdField_if(90 - ((a)paramList.get(0)).jdField_if(), ((a)paramList.get(0)).a());
        if (paramList.size() > 1)
          for (int i1 = 1; i1 < paramList.size(); i1++)
          {
            double[] arrayOfDouble2 = jdField_if(90 - ((a)paramList.get(i1)).jdField_if(), ((a)paramList.get(i1)).a());
            arrayOfDouble1[0] = ((arrayOfDouble1[0] + arrayOfDouble2[0]) / 2.0D);
            arrayOfDouble1[1] = ((arrayOfDouble1[1] + arrayOfDouble2[1]) / 2.0D);
          }
        return arrayOfDouble1;
      }
      return null;
    }

    private double[] jdField_if(double paramDouble1, double paramDouble2)
    {
      double[] arrayOfDouble = new double[2];
      arrayOfDouble[0] = (paramDouble1 * Math.sin(Math.toRadians(paramDouble2)));
      arrayOfDouble[1] = (paramDouble1 * Math.cos(Math.toRadians(paramDouble2)));
      return arrayOfDouble;
    }

    public double a()
    {
      return this.j;
    }

    public int a(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4, boolean paramBoolean5)
    {
      if (!this.h)
        return 0;
      if ((paramBoolean1) && (this.q))
      {
        this.t = 1;
        if (this.jdField_for >= this.a)
          return 1;
        if (this.jdField_for <= this.jdField_void)
          return 4;
      }
      if ((paramBoolean2) && (this.s))
      {
        this.t = 2;
        if (this.j <= this.jdField_byte)
          return 1;
        if (this.j >= this.e)
          return 4;
      }
      if ((paramBoolean3) && (this.s))
      {
        this.t = 3;
        if (this.B <= this.jdField_case)
          return 1;
        if (this.B >= this.f)
          return 4;
      }
      int i6;
      if ((paramBoolean4) && (this.i))
      {
        this.t = 4;
        Iterator localIterator2 = this.u.iterator();
        i6 = 0;
        if (localIterator2.hasNext())
          if (((a)localIterator2.next()).jdField_do() < this.jdField_int)
            break label767;
      }
      label760: label767: for (int i7 = i6 + 1; ; i7 = i6)
      {
        i6 = i7;
        break;
        if (i6 >= this.jdField_do)
          return 1;
        if (i6 <= this.b)
          return 4;
        ArrayList localArrayList1;
        ArrayList localArrayList2;
        ArrayList localArrayList3;
        int i2;
        if ((paramBoolean5) && (this.i))
        {
          this.t = 5;
          localArrayList1 = new ArrayList();
          localArrayList2 = new ArrayList();
          localArrayList3 = new ArrayList();
          for (int i1 = 0; i1 < 10; i1++)
            localArrayList1.add(new ArrayList());
          Iterator localIterator1 = this.u.iterator();
          i2 = 0;
          if (localIterator1.hasNext())
          {
            a locala = (a)localIterator1.next();
            if ((locala.jdField_do() < 10) || (locala.jdField_if() < 1))
              break label760;
            ((List)localArrayList1.get((locala.jdField_do() - 10) / 5)).add(locala);
          }
        }
        for (int i5 = i2 + 1; ; i5 = i2)
        {
          i2 = i5;
          break;
          if (i2 >= 4)
          {
            for (int i3 = 0; i3 < localArrayList1.size(); i3++)
              if (((List)localArrayList1.get(i3)).size() != 0)
              {
                double[] arrayOfDouble4 = a((List)localArrayList1.get(i3));
                if (arrayOfDouble4 != null)
                {
                  localArrayList2.add(arrayOfDouble4);
                  localArrayList3.add(Integer.valueOf(i3));
                }
              }
            if ((localArrayList2 != null) && (localArrayList2.size() > 0))
            {
              double[] arrayOfDouble1 = (double[])localArrayList2.get(0);
              arrayOfDouble1[0] *= ((Integer)localArrayList3.get(0)).intValue();
              arrayOfDouble1[1] *= ((Integer)localArrayList3.get(0)).intValue();
              if (localArrayList2.size() > 1)
                for (int i4 = 1; i4 < localArrayList2.size(); i4++)
                {
                  double[] arrayOfDouble3 = (double[])localArrayList2.get(i4);
                  arrayOfDouble3[0] *= ((Integer)localArrayList3.get(i4)).intValue();
                  arrayOfDouble3[1] *= ((Integer)localArrayList3.get(i4)).intValue();
                  arrayOfDouble1[0] = ((arrayOfDouble1[0] + arrayOfDouble3[0]) / 2.0D);
                  arrayOfDouble1[1] = ((arrayOfDouble1[1] + arrayOfDouble3[1]) / 2.0D);
                }
              double[] arrayOfDouble2 = a(arrayOfDouble1[0], arrayOfDouble1[1]);
              if (arrayOfDouble2[0] <= this.jdField_goto)
                return 1;
              if (arrayOfDouble2[0] >= this.w)
                return 4;
            }
            else
            {
              return 4;
            }
          }
          else
          {
            return 4;
          }
          this.t = 0;
          return 3;
        }
      }
    }

    public double b()
    {
      return this.B;
    }

    public String jdField_byte()
    {
      return this.v;
    }

    public int c()
    {
      return a(true, true, true, true, true);
    }

    public double jdField_case()
    {
      return this.n;
    }

    public boolean jdField_char()
    {
      return this.q;
    }

    public double d()
    {
      return this.jdField_new;
    }

    public List jdField_do()
    {
      return this.u;
    }

    public String e()
    {
      return this.r;
    }

    public List jdField_else()
    {
      return this.m;
    }

    public int f()
    {
      return this.C;
    }

    public double jdField_for()
    {
      return this.jdField_long;
    }

    public int g()
    {
      return this.c;
    }

    public int jdField_goto()
    {
      return this.jdField_for;
    }

    public boolean h()
    {
      return this.s;
    }

    public boolean i()
    {
      return this.k;
    }

    public boolean jdField_if()
    {
      return this.h;
    }

    public String jdField_int()
    {
      return this.p;
    }

    public double j()
    {
      return this.z;
    }

    public String k()
    {
      return this.A;
    }

    public double l()
    {
      return this.d;
    }

    public boolean jdField_long()
    {
      return this.i;
    }

    public int m()
    {
      return this.o;
    }

    public String n()
    {
      return this.jdField_try;
    }

    public char jdField_new()
    {
      return this.jdField_char;
    }

    public double jdField_try()
    {
      return this.jdField_else;
    }

    public void jdField_void()
    {
      if (a(this.jdField_try))
      {
        String str6 = this.jdField_try.substring(0, -3 + this.jdField_try.length());
        int i12 = 0;
        for (int i13 = 0; i13 < str6.length(); i13++)
          if (str6.charAt(i13) == ',')
            i12++;
        String[] arrayOfString4 = str6.split(",", i12 + 1);
        if ((!arrayOfString4[1].equals("")) && (!arrayOfString4[2].equals("")) && (!arrayOfString4[4].equals("")) && (!arrayOfString4[6].equals("")) && (!arrayOfString4[7].equals("")) && (!arrayOfString4[9].equals("")))
        {
          int i14 = 1;
          int i15 = 1;
          if (arrayOfString4[3].equals("S"))
            i14 = -1;
          if (arrayOfString4[5].equals("W"))
            i15 = -1;
          this.d = (i14 * (Integer.valueOf(arrayOfString4[2].substring(0, 2)).intValue() + Double.valueOf(arrayOfString4[2].substring(2, arrayOfString4[2].length())).doubleValue() / 60.0D));
          this.jdField_new = (i15 * (Integer.valueOf(arrayOfString4[4].substring(0, 3)).intValue() + Double.valueOf(arrayOfString4[4].substring(3, arrayOfString4[4].length())).doubleValue() / 60.0D));
          this.jdField_else = Double.valueOf(arrayOfString4[9]).doubleValue();
          this.c = Integer.valueOf(arrayOfString4[6]).intValue();
          this.jdField_for = Integer.valueOf(arrayOfString4[7]).intValue();
          this.q = true;
        }
      }
      String[] arrayOfString3;
      double d1;
      if (a(this.A))
      {
        String str5 = this.A.substring(0, -3 + this.A.length());
        int i10 = 0;
        for (int i11 = 0; i11 < str5.length(); i11++)
          if (str5.charAt(i11) == ',')
            i10++;
        arrayOfString3 = str5.split(",", i10 + 1);
        if ((!arrayOfString3[9].equals("")) && (!arrayOfString3[2].equals("")))
        {
          this.jdField_char = Character.valueOf(arrayOfString3[2].charAt(0)).charValue();
          if (!arrayOfString3[7].equals(""))
            break label603;
          d1 = 0.0D;
          this.n = d1;
          if ((!arrayOfString3[8].equals("")) && (!arrayOfString3[8].equalsIgnoreCase("nan")))
            break label623;
        }
      }
      String str4;
      int i8;
      label603: label623: for (double d2 = 500.0D; ; d2 = Double.valueOf(arrayOfString3[8]).doubleValue())
      {
        this.z = d2;
        this.k = true;
        if (!a(this.r))
          break label790;
        str4 = this.r.substring(0, -3 + this.r.length());
        i8 = 0;
        for (int i9 = 0; i9 < str4.length(); i9++)
          if (str4.charAt(i9) == ',')
            i8++;
        d1 = 1.852D * Double.valueOf(arrayOfString3[7]).doubleValue();
        break;
      }
      String[] arrayOfString2 = str4.split(",", i8 + 1);
      if ((!arrayOfString2[2].equals("")) && (!arrayOfString2[(-3 + arrayOfString2.length)].equals("")) && (!arrayOfString2[(-2 + arrayOfString2.length)].equals("")) && (!arrayOfString2[(-1 + arrayOfString2.length)].equals("")))
      {
        this.C = Integer.valueOf(arrayOfString2[2]).intValue();
        this.B = Double.valueOf(arrayOfString2[(-3 + arrayOfString2.length)]).doubleValue();
        this.j = Double.valueOf(arrayOfString2[(-2 + arrayOfString2.length)]).doubleValue();
        this.jdField_long = Double.valueOf(arrayOfString2[(-1 + arrayOfString2.length)]).doubleValue();
        this.s = true;
      }
      label790: if ((this.m != null) && (this.m.size() > 0))
      {
        if (Integer.valueOf(((String)this.m.get(0)).split(",")[1]).intValue() == this.m.size());
        String str3;
        int i1;
        for (boolean bool2 = true; ; bool2 = false)
        {
          this.i = bool2;
          if (!this.i)
            break label1166;
          Iterator localIterator = this.m.iterator();
          if (!localIterator.hasNext())
            break label1166;
          String str1 = (String)localIterator.next();
          if (!a(str1))
            break label1161;
          String str2 = str1.split(",", 5)[4];
          str3 = str2.substring(0, -3 + str2.length());
          i1 = 0;
          for (int i2 = 0; i2 < str3.length(); i2++)
            if (str3.charAt(i2) == ',')
              i1++;
        }
        String[] arrayOfString1 = str3.split(",", i1 + 1);
        int i3 = 0;
        label989: int i4;
        int i5;
        int i6;
        if (i3 < arrayOfString1.length)
          if ((!arrayOfString1[i3].equals("")) && (!arrayOfString1[(i3 + 1)].equals("")) && (!arrayOfString1[(i3 + 2)].equals("")))
          {
            this.o = (1 + this.o);
            i4 = Integer.valueOf(arrayOfString1[i3]).intValue();
            i5 = Integer.valueOf(arrayOfString1[(i3 + 1)]).intValue();
            i6 = Integer.valueOf(arrayOfString1[(i3 + 2)]).intValue();
            if (!arrayOfString1[(i3 + 3)].equals(""))
              break label1143;
          }
        label1143: for (int i7 = 0; ; i7 = Integer.valueOf(arrayOfString1[(i3 + 3)]).intValue())
        {
          this.u.add(new a(i4, i6, i5, i7));
          i3 += 4;
          break label989;
          break;
        }
        this.i = false;
        if ((!this.q) || (!this.s))
          break label1196;
      }
      label1161: label1166: label1196: for (boolean bool1 = true; ; bool1 = false)
      {
        this.h = bool1;
        return;
        this.i = false;
        break;
      }
    }

    public class a
    {
      private int a = 0;
      private int jdField_do = 0;
      private int jdField_if = 0;
      private int jdField_int = 0;

      public a(int paramInt1, int paramInt2, int paramInt3, int arg5)
      {
        this.jdField_int = paramInt1;
        this.a = paramInt2;
        this.jdField_if = paramInt3;
        int i;
        this.jdField_do = i;
      }

      public int a()
      {
        return this.a;
      }

      public int jdField_do()
      {
        return this.jdField_do;
      }

      public int jdMethod_for()
      {
        return this.jdField_int;
      }

      public int jdField_if()
      {
        return this.jdField_if;
      }
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.baidu.location.b
 * JD-Core Version:    0.6.2
 */